<template name="merchantverStep3">
	<view class="merchantverStep3">
		<view class="title">
			<view class="title_black">请选择店铺认证类型</view>
			<view class="title_grey">请按照真实经营状态选择类型</view>
		</view>
		<view class="content">
			<view class="conList" @click="popShow(1)">
				<view class="conList_title">
					<view class="title_left">
						<image src="../../static/img/ico_ws.png"></image>
						<view class="">小微商户</view>
					</view>
					<image class="title_right" src="../../static/img/my_back.png" mode=""></image>
				</view>
				<view class="conList_con">
					<view class="">适合没有营业执照的小微商户</view>
					<view class="bluefont">收入可提现至个人银行卡</view>
				</view>
			</view>
			<view class="conList" @click="popShow(2)">
				<view class="conList_title">
					<view class="title_left">
						<image src="../../static/img/icon_merchant.png"></image>
						<view class="">个体工商户</view>
					</view>
					<image class="title_right" src="../../static/img/my_back.png" mode=""></image>
				</view>
				<view class="conList_con">
					<view class="">适合营业执照名称或类型包含个体工商户、个人独资企业的公司</view>
					<view class="bluefont">收入可提现至法人银行卡、对公账号</view>
				</view>
			</view>
			<!-- <view class="conList" @click="popShow(3)">
				<view class="conList_title">
					<view class="title_left">
						<image src="../../static/img/icon_company.png"></image>
						<view class="">企业/公司</view>
					</view>
					<image class="title_right" src="../../static/img/my_back.png" mode=""></image>
				</view>
				<view class="conList_con">
					<view class="">适合营业执照名称或类型包含有限责任、股份有限公司</view>
					<view class="bluefont">收入可提现至法人银行卡、对公账号</view>
				</view>
			</view> -->
		</view>
		<u-popup v-model="pay.payshow" mode="bottom">
			<view class="payPop">
				<view class="payPop_title">你想通过什么方式收款?</view>
				<view class="payPop_con">
					<view class="payPop_conEve" @click="publicPrivateSw(1)">
						<text>对私结算</text>
						<image :src="pay.publicPrivate==1?'../../static/img/ic_choose.png':'../../static/img/ic_choose_n.png'"></image>
					</view>
					<view class="payPop_conEve" @click="publicPrivateSw(2)">
						<text>对公结算</text>
						<image :src="pay.publicPrivate==2?'../../static/img/ic_choose.png':'../../static/img/ic_choose_n.png'"></image>
					</view>
				</view>
				<view class="payPop_btn">
					<button type="default" class="payPop_btn_cancel" @click="pay.payshow = false">取消</button>
					<button type="primary" class="payPop_btn_sure" @click="shopVer">确定</button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import { settype } from '../../api/index.js';
	export default {
		name: "merchantverStep3",
		data() {
			return {
				pay:{
					payshow:false,
					publicPrivate:1  //1:对私结算 2:对公结算
				},
				businessType:''  //1：小微商户  2:个体工商户  3:企业/公司
			};
		},
		mounted:function(){
			
		},
		methods:{
			popShow:function(type){
				this.businessType = type;
				if(type==1){
					this.pay.publicPrivate = 1; //小微商户默认对私结算
					this.shopVer()
				}else{
					this.pay.payshow = true;
				}
			},
			publicPrivateSw:function(publicPrivate){
				this.pay.publicPrivate = publicPrivate;
			},
			shopVer:function(){
				settype({
					// suid:'10001344',
					suid:this.$store.state.merchantver.suid,//门店ID
					business_type:this.businessType,//商户企业类型 1小微 2个体工商 3企业
					public_private:this.pay.publicPrivate//对公对私类型 1对私 2对公
				}).then((res) => {
					if(res.code == 0){
						uni.navigateTo({
							url:`../../view/merchantverShop/merchantverShop?businessType=${this.businessType}&publicPrivate=${this.pay.publicPrivate}`
						})
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
					}
				}).catch((e) => {
					console.log(e);
				})
			}
		},
		components: {
		    
		}
	}
</script>

<style lang="scss" scoped>
	.merchantverStep3{
		font-size: $uni-font-size-base;
		.title{
			text-align: center;
			margin-top: 30rpx;
			.title_black{
				font-size: $uni-font-size-lg;
				color: #333333;
				font-weight: bold;
			}
			.title_grey{
				color: #999999;
				font-size: $uni-font-size-sm;
			}
		}
		.content{
			padding: 0 30rpx;
			.conList{
				background-color: #FFFFFF;
				padding: 30rpx 30rpx 20rpx 30rpx;
				// border-radius: $uni-border-radius-lg;
				border-radius: 20rpx;
				margin-top: 30rpx;
				box-shadow: 0px 6rpx 24rpx rgba(189, 189, 189, 0.3);
				.conList_title{
					display: flex;
					justify-content: space-between;
					align-items: center;
					border-bottom: 1px solid #EEEEEE;
					padding-bottom: 20rpx;
					font-size: $uni-font-size-lg;
					.title_left{
						display: flex;
						align-items: center;
						font-weight: bold;
						image{
							width: 48rpx;
							height: 48rpx;
							margin-right: 20rpx;
						}
					}
					.title_right{
						width: 22rpx;
						height: 22rpx;
					}
				}
				.conList_con{
					padding-top: 20rpx;
					font-size: $uni-font-size-sm;
					padding-left: 70rpx;
					line-height: 40rpx;
				}
			}
		}
	
		//弹窗样式
		.payPop{
			.payPop_title{
				font-size: $uni-font-size-lg;
				text-align: center;
				font-weight: bold;
				padding: 30rpx;
				border-bottom: 1rpx solid #EEEEEE;
			}
			.payPop_con{
				.payPop_conEve{
					display: flex;
					padding: 30rpx 60rpx;
					justify-content: space-between;
					image{
						width: 42rpx;
						height: 42rpx;
					}
				}
			}
			.payPop_btn{
				display: flex;
				justify-content: space-between;
				padding-bottom: 20rpx;
				button{
					width: 340rpx;
					height: 90rpx;
					line-height: 90rpx;
					font-size: $uni-font-size-base;
					&.payPop_btn_cancel{
						color: #666666;
					}
					&.payPop_btn_sure{
						
					}
				}
			}
		}
	}
</style>
